package com.tinysand.advert.support;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang.StringUtils;

/**
 * 推广单元请求对象
 *
 * Created By TINY
 * Create Time 2020/2/21
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AdUnitRequest {

    /* 推广计划id */
    private Long planId;

    /* 推广单元名称 */
    private String unitName;

    /* 推广展示类型 */
    private Integer positionType;

    /* 推广预算 */
    private Long budget;

    public boolean createValidate() {
        return null != planId
                && !StringUtils.isEmpty(unitName)
                && positionType != null
                && budget != null;
    }

}
